 <%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<%=request.getContextPath() %>/static/common/plugin/bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<%=request.getContextPath() %>/static/common/plugin/toastr/toastr.css" rel="stylesheet" type="text/css" /> 
<link href="<%=request.getContextPath() %>/static/common/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<%=request.getContextPath() %>/static/common/plugin/nice-validator-0.10.5/dist/jquery.validator.css"/>
<script type="text/javascript" src="<%=request.getContextPath() %>/static/common/js/jquery.js"></script> 
<script type="text/javascript" src="<%=request.getContextPath() %>/static/common/plugin/jquery.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/static/common/plugin/nice-validator-0.10.5/dist/jquery.validator.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/static/common/plugin/nice-validator-0.10.5/dist/local/zh-CN.js"></script>
<title>无标题文档</title>
</head>
<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">添加用户页面</a></li>
    </ul>
    </div>
      <c:if test="${!empty errorInfo }">
		<div class="alert alert-danger alert-dismissible fade in" role="alert">
			<button type="button" class="close" data-dismiss="alert"
				aria-label="Close">
				<span aria-hidden="true">×</span>
			</button>
			<strong>${errorInfo }</strong>
		</div>
	</c:if>
    <div class="formbody">
    
    <div class="formtitle"><span>基本信息</span></div>
    <form 
       action="<%=request.getContextPath()%>/SysServlet?command=adduser"
				method="post" onreset="clearInfo();">
    <ul class="forminfo">
    <li><label>帐号：</label><input type="text"  class="dfinput" name="code" id="code"
					onblur="validateusename();" value="请您输入账号"
					onfocus="clearusenameText();" /><span id="codeInfo"></span></li>
    <li><label>密码：</label><input type="password" class="dfinput" name="password"
					id="password" onblur="validatePassword();" placeholder="请您输入密码"/><span
					id="passwordInfo"></span></li>
    <li><label>确认密码：</label><cite><input type="password"
					class="dfinput" name="password2" id="password2"
					onblur="validatePassword1();" placeholder="请您再次输入密码"/><span
					id="password2Info"></span></li>
    <li><label>名字：</label><input type="text"
					class="dfinput" name="name" id="name"
					onblur="validatename();" value="请您输入名字"
					onfocus="nameText();" /><span id="nameInfo"></span></li>
    <li><label>性别：</label><input type="radio"  id="gender" name="gender" value="1" checked="checked" />男
					<input type="radio" name="gender" value="2" />女 
	         	    <span id="genderInfo" name="span"></span></li>
	<li><label>邮箱：</label><input type="text" class="dfinput" name="email" id="email"
					onblur="validateEmail();" value="请您输邮箱账号" onfocus="clearemailText();" /><span id="emailInfo"></span></li>
    <li><label>电话：</label><input type="text" class="dfinput" name="phone" id="phone"
					onblur="validatecellphone();" value="请您输入手机号"
					onfocus="clearcellphoneText();" /><span id="phoneInfo"></span></li>
    <!-- <li><label>角    色：</label><input type="text" class="dfinput" name="role"
					id="role" onblur="validateRole();" value="请您输入角色"
					onfocus="cleareRoleText();" /><span id="roleInfo"></span></li> -->
					
	<li><label>角    色：</label><select name="role" class="form-control" style="width:100px ; display: inline">
				<option value="1" <c:if test="">selected=selected</c:if>>管理员</option>
				<option value="2" <c:if test="">selected=selected</c:if>>老师</option>
	            <option value="3" <c:if test="">selected=selected</c:if>>学生</option>
			</select>
	</li>
   <!--  <li><label>班    级：</label><input type="text" class="dfinput" name="classid"
					id="classid" onblur="validateClass();" value="请您输入班级"
					onfocus="cleareClassText();" /><span id="classidInfo"></span></li> -->
	<li><label>班    级：</label><select name="classid" class="form-control" style="width:120px ; display: inline">
				<c:forEach items="${classNameList }" var="className"  >
				<option value="${className.id }" <c:if test="">selected=selected</c:if>>${className.name }</option>
	            </c:forEach>
			</select>
	</li>				
    <li><label>操作者编号：</label><input type="text" class="dfinput" name="operate_user_id"
					id="operate_user_id" onblur="validateOperate();" 
					onfocus="cleareOperateText();"  /><span id="operate_user_idInfo"></span></li>
    <!-- <li><label>状态：</label><input type="text" class="dfinput" name="state"
					id="state" onblur="validateState();" value="请您输入状态 （1为有效，2为无效）"
					onfocus="cleareStateText();" /><span id="stateInfo"></span></li> -->
	<li><label>状态：</label><select name="state" class="form-control" style="width:100px ; display: inline">
				<option value="1" <c:if test="">selected=selected</c:if>>启用</option>
				<option value="2" <c:if test="">selected=selected</c:if>>禁用</option>
			</select>
	</li>
    <li><label>描述：</label><input type="text" class="dfinput" name="memo"
					id="memo" onblur="validateMemo();" value="请您输入个人描述"
					onfocus="cleareMemoText();" /><span id="memoInfo"></span></li>
    <li><label>验证码：</label><input type="text" class="dfinput" id="vrafyPassworf" name="vrafyPassworf" placeholder="请输验证码" style="width:10%; height:50px; display: inline;" maxlength="4"/>
					<img src="<%=request.getContextPath() %>/kaptcha.jpg" width="120px" height="50px" style="cursor:pointer"; id="pic" onclick="changePic()"/></li>			
    <li><label></label><button type="submit"  class="btn btn-primary">确认添加</button></li>
    </ul>
    </form>
    </div>
	<script src="<%=request.getContextPath()%>/static/common/plugin/jquery.min.js"></script>
	<script src="<%=request.getContextPath()%>/static/common/plugin/bootstrap-3.3.5/js/bootstrap.min.js"></script>
	<script src="<%=request.getContextPath()%>/static/common/js/addUser.js"/> 
	<script>
	  var changePic = function(){
		  document.getElementById('pic').src = '<%=request.getContextPath() %>/kaptcha.jpg?time=' + new Date().getTime();
	  }
	</script>
</body>

</html>


